home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Visual Basic 5.0 (2nd Edition) / Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso / Code / OpenPic.cls < prev    next >
Text File  |  1997-06-14  |  2KB  |  73 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "COpenPictureFile"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = True
  8. Attribute VB_PredeclaredId = False
  9. Attribute VB_Exposed = True
  10. Option Explicit
  11.  
  12. Public Enum EErrorOpenPictureFile
  13.     eeBaseOpenPictureFile = 13680   ' COpenPictureFile
  14. End Enum
  15.  
  16. ' Bit flags for filter types
  17. Public Enum EFilterPicture
  18.     efpAllPicture = &H1
  19.     efpBitmap = &H2
  20.     efpMetafile = &H4
  21.     efpIcon = &H8
  22.     efpCursor = &H10
  23.     efpWave = &H20
  24.     efpAllFile = &H40
  25.     efpEverything = &H7F
  26. End Enum
  27.                        
  28. Private frm As New FOpenPictureFile
  29.  
  30. Sub Load(Optional ByVal Left As Single = -1#, _
  31.          Optional ByVal Top As Single = -1#)
  32.     frm.Dummy = False
  33.     If Left <> -1# Then frm.Left = Left
  34.     If Top <> -1# Then frm.Top = Top
  35.     frm.Show vbModal
  36. End Sub
  37.  
  38. Property Get FileTitle() As String
  39.     FileTitle = frm.FileTitle
  40. End Property
  41.  
  42. Property Get FileName() As String
  43.     FileName = frm.FileName
  44. End Property
  45.  
  46. Property Let FileName(sFilePathA As String)
  47.     frm.FileName = sFilePathA
  48. End Property
  49.  
  50. Property Get InitDir() As String
  51.     InitDir = frm.InitDir
  52. End Property
  53.  
  54. Property Let InitDir(sInitDirA As String)
  55.     frm.InitDir = sInitDirA
  56. End Property
  57.  
  58. Property Get PicType() As Integer
  59.     PicType = frm.PicType
  60. End Property
  61.  
  62. Property Get FilterType() As Long
  63.     FilterType = frm.FilterType
  64. End Property
  65.  
  66. Property Let FilterType(afFilterA As Long)
  67.     frm.FilterType = afFilterA
  68. End Property
  69.  
  70.  
  71.  
  72.  
  73.